{extend name="iframe" /}

{block name="body"}
{include file="breadcrumb" /}
<div class="layui-fluid">
    <div class="layui-card">
        <div class="layui-card-body">
            <form method="post" class="editData layui-form xn_ajax2" data-type="open" action="edit.html">
                <input type="hidden" name="id" value="{$data.id}">

                        <div class="layui-form-item">
            <label class="layui-form-label">所属部门</label>
            <div class="layui-input-inline">
                <select name="depart_id" lay-verify="required">
                    <option value="请选择所属部门"></option>
                    {foreach name="depart_idList" item="vo" key="key"}
                     <option value="{$key}" {if $data[depart_id] ==$key }selected{/if} >{$vo}</option>
                    {/foreach}
                </select>
            </div>
            <div class="layui-form-mid layui-word-aux"></div>
        </div>
                <div class="layui-form-item layui-form-text">
                    <label class="layui-form-label">头像</label>
                    <div class="layui-input-block">
                        {:xn_upload_one($data.head,'head')}
                    </div>
                </div>
<div class="layui-form-item">
            <label class="layui-form-label">姓名</label>
            <div class="layui-input-inline">
                <input type="text" name="name" lay-verify="required" placeholder="请输入员工姓名或昵称" autocomplete="off" class="layui-input" value="{$data.name}">
            </div>
            <div class="layui-form-mid layui-word-aux"></div>
        </div>
<div class="layui-form-item">
            <label class="layui-form-label">手机号</label>
            <div class="layui-input-inline">
                <input type="text" name="mobile" lay-verify="required" placeholder="请输入员工手机号，用于登录" autocomplete="off" class="layui-input" value="{$data.mobile}">
            </div>
            <div class="layui-form-mid layui-word-aux"></div>
        </div>
<div class="layui-form-item">
            <label class="layui-form-label">密码</label>
            <div class="layui-input-inline">
                <input type="text" name="password"  placeholder="留空则不修改密码" autocomplete="off" class="layui-input" value="">
            </div>
            <div class="layui-form-mid layui-word-aux"></div>
        </div>

<div class="layui-form-item">
            <label class="layui-form-label">优先级</label>
            <div class="layui-input-inline">
                <input type="text" name="priority" lay-verify="required" placeholder="越大越优先接入会话" autocomplete="off" class="layui-input" value="{$data.priority}">
            </div>
            <div class="layui-form-mid layui-word-aux"></div>
        </div>
    <div class="layui-form-item">
        <label class="layui-form-label">状态</label>
        <div class="layui-input-inline">
            <input type="hidden" name="status" value="0">
            <input type="checkbox" lay-verify="required" lay-filter="status" name="status" lay-skin="switch" lay-text="启用|禁用" value="1" {if $data[status] ==1 }checked{/if}  >
        </div>
        <div class="layui-form-mid layui-word-aux"></div>
    </div>


                <div class="layui-form-item">
                    <div class="layui-input-block">
                        <button type="submit" lay-filter="save" lay-submit class="layui-btn">保存</button>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>
{/block}
